package com.yjhb.android.sbz.tool;

import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;

/**
 * 创建者 zx
 * 创建时间 2020/11/20 9:56
 */
public class AnimationTool {
    private final String TAG = "AnimationTool";


    public static TranslateAnimation getInAnim() {
        TranslateAnimation in = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0, Animation.RELATIVE_TO_PARENT, 0,
                Animation.RELATIVE_TO_PARENT, 1.0f, Animation.RELATIVE_TO_PARENT, 0f);
        in.setDuration(500);
        return in;
    }

    public static TranslateAnimation getOutAnim() {
        TranslateAnimation out = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0, Animation.RELATIVE_TO_PARENT, 0,
                Animation.RELATIVE_TO_PARENT, 0f, Animation.RELATIVE_TO_PARENT, -1f);
        out.setDuration(500);
        return out;
    }

}
